﻿using System;
using System.Threading.Tasks;

namespace XcoAppSpaces.Core.Ports
{
	/// <summary>
	/// Options for the execution of port receivers.
	/// </summary>
	public class PortReceiverOptions
	{
		/// <summary>
		/// The maximum degree of parallelism. e.g. 2 = a maximum of 2 items from this port will be processed in parallel.
		/// When the value is set to 1, it means sequential processing.
		/// If not set, the default value is the number of cores, or at least 2.
		/// </summary>
		public int MaxDegreeOfParallelism { get; set; }

		/// <summary>
		/// The task scheduler that should be used for running the port receiver method.
		/// </summary>
		public TaskScheduler TaskScheduler { get; set; }
	}
}